package com.atung.parking.request.save;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author Administrator
 */
@Data
public class SaveOrUpdateLicensePlateRequest implements Serializable {

    @ApiModelProperty("编号")
    private Long id;
    @ApiModelProperty("车牌号")
    @NotBlank(message = "车牌号不能为空")
    @Pattern(regexp = "^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})|([0-9]{2}[A-HJ-NP-Z0-9]{3})|([A-HJ-NP-Z0-9]{5}[A-HJ-NP-Z0-9挂学警港澳]))|[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]$", message = "无效的车牌号")
    private String licensePlate;
}
